import datetime
from applications.extensions import db


class Earthquake(db.Model):
    __tablename__ = 'admin_earthquake'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='id')
    Longitude = db.Column(db.String(20), comment='经度')
    Latitude = db.Column(db.String(20), comment='纬度')
    Deep = db.Column(db.Integer, comment='震源深度')
    Type = db.Column(db.String(20), comment='震级类型')
    Level = db.Column(db.String(20), comment='震级')
    Location = db.Column(db.String(20), comment='震中位置')
    create_at = db.Column(db.DateTime, default=datetime.datetime.now, comment='发震日期')


class Building(db.Model):
    __tablename__ = 'admin_building'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='id')
    Name = db.Column(db.String(20), comment='楼栋名字')
    Num = db.Column(db.Integer, comment='总人数')
    People1 = db.Column(db.String(20), comment='总负责人')
    People2 = db.Column(db.String(20), comment='指挥小组成员')
